﻿using System.Data;

namespace TurtleEngine.Databases
{
	 /// <summary>
	 ///
	 /// </summary>
	 public interface IConnect
	 {
		  /// <summary>
		  /// Checks the server online.
		  /// </summary>
		  /// <param name="server">The server.</param>
		  /// <returns></returns>
		  bool CheckServerOnline(string server);

		  /// <summary>
		  /// Connects the specified connection string.
		  /// </summary>
		  /// <param name="connectionString">The connection string.</param>
		  /// <returns></returns>
		  bool Connect(string connectionString);

		  /// <summary>
		  /// Connections the string builder.
		  /// </summary>
		  /// <returns></returns>
		  string ConnectionStringBuilder();

		  /// <summary>
		  /// Disconnects this instance.
		  /// </summary>
		  void Disconnect();

		  /// <summary>
		  /// Finds the database instances.
		  /// </summary>
		  /// <param name="server">The server.</param>
		  /// <returns></returns>
		  bool FindDatabaseInstances(string server);

		  /// <summary>
		  /// Finds the database servers.
		  /// </summary>
		  /// <returns></returns>
		  DataTable FindDatabaseServers();

		  /// <summary>
		  /// Gets the database instances.
		  /// </summary>
		  /// <param name="server">The server.</param>
		  /// <returns></returns>
		  DataTable GetDatabaseInstances(string server);
	 }
}